#ifndef WIFI_BOARD_H
#define WIFI_BOARD_H

#include "board.h"

class WifiBoard : public Board {
   public:
    // ✅ 定义 Wi-Fi 状态机的状态枚举
    enum class WifiState { Idle, Scanning, Connecting, Connected, Failed, ConfigMode };

   protected:
    bool wifi_config_mode_ = false;

    // 状态变更通知
    WifiState current_state_ = WifiState::Idle;

    WifiBoard();
    void EnterWifiConfigMode();
    virtual std::string GetBoardJson() override;
    void SetState(WifiState new_state);

   public:
    virtual std::string GetBoardType() override;
    virtual void StartNetwork() override;
    virtual Http* CreateHttp() override;
    virtual WebSocket* CreateWebSocket() override;
    virtual Mqtt* CreateMqtt() override;
    virtual Udp* CreateUdp() override;
    virtual SinalStrength GetWiFiStrength() override;
    virtual std::string GetWiFiSSid() override;
    virtual void SetPowerSaveMode(bool enabled) override;
    virtual void ResetNetConfiguration() override;
    virtual bool NetIsConnected() override;
};

#endif  // WIFI_BOARD_H
